package organization;

import java.io.Serializable;

public class Group implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8L;
	private String grpName;
	private int course;

	static int maxGroupID = 1;
	private int groupID;

	public Group(String name, int course) {
		grpName = name;
		this.course = course;
		groupID = maxGroupID++;

	}

	public String getGrpName() {
		return grpName;
	}

	public int getGrpID() {
		return groupID;
	}

	public int getCourse() {
		return course;
	}

	public boolean equals(Group obj) {
		if (obj.getGrpName().equals(grpName)) {
			if (obj.getCourse() == course) {
				return true;
			}
		}
		return false;
	}

	public static int getMaxGroupID() {
		return maxGroupID;
	}
}
